function http(params){
    return new Promise((resolve,reject)=>{
        wx.showLoading({
          title: '正在加载',
        })
        wx.request({
            ...params,
          success:(res)=>{
              resolve(res)
              
          },
          fail:(err)=>{
              reject(err)
          },
          complete:()=>{
            wx.hideLoading({
                success:(res)=>{}
            })
          }
        })
    })
}
module.exports = http